﻿using System;

class UpcaseProblem
{
    static string ToUp(string inputText)
    {
        
        string openTag = "<" + "upcase" + ">";
        string closeTag = "</" +"upcase" + ">";
        while (inputText.IndexOf(openTag) != -1)
        {
            int fromPosition = inputText.IndexOf(openTag);
            int toPosition = inputText.IndexOf(closeTag);
            string betweenTags = inputText.Substring(fromPosition + openTag.Length, toPosition - fromPosition - openTag.Length);
            inputText = inputText.Replace(betweenTags, betweenTags.ToUpper());
        }
        return inputText;
    }
    static void Main()
    {
        string inputText = "We are living in a <upcase>yellow submarine</upcase>. We don't have <upcase>anything</upcase> else.";
        ToUp(inputText);
    }
}

